/****************************************************************
 *Author:       zxx
 *UnityVersion：2019.4.1f1
 *Date:         2020/07/31 11:30:14
 *Description:    
*****************************************************************/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class JumpTrigger : MonoBehaviour {

    private float jumpHeight;

    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.tag == "Player")
        {
            Debug.Log("加速跳板");
            jumpHeight = collision.GetComponent<PlayerController>().jumpHeight;
            collision.GetComponent<PlayerController>().jumpHeight = 8;
        }
    }

    private void OnTriggerExit2D(Collider2D collision)
    {
        if (collision.tag == "Player")
        {
            collision.GetComponent<PlayerController>().jumpHeight = jumpHeight;
            
        }
    }
}

